package com.happyrecyclingstation.service;

import com.happyrecyclingstation.dto.AdminUserQueryDto;
import com.happyrecyclingstation.dto.UserDto;
import com.happyrecyclingstation.entity.User;
import com.happyrecyclingstation.vo.AdminUserVO;
import com.happyrecyclingstation.vo.PageResult;

public interface UserService {

    /**
     * 管理查询用户列表
     * @param queryParam
     * @return
     */
    PageResult<AdminUserVO> getUser(AdminUserQueryDto queryParam);

    /**
     * 根据id查询用户
     * @param id
     * @return
     */
    User getUserById(Integer id);

    /**
     * 启用或禁用用户
     * @param status
     * @param id
     */
    void startOrStopUser(Short status, Integer id);

    /**
     * 判断用户是否关联企业
     * @return
     */
    Boolean isRelated();

    /**
     * 修改用户信息
     * @param userDto
     */
    void update(UserDto userDto);

    /**
     * 修改用户密码
     * @param oldPwd
     * @param newPwd
     * @return
     */
    Boolean updatePwd(String oldPwd, String newPwd);
}
